package com.ep.thirdPlatformProject.dhg.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;

@Data
@TableName("v_enable_orgs")
public class DhgDepartmentEntity {

    /**
     * 原始id
     */
    @TableId
    private BigInteger originId;

    /**
     * 名字
     */
    private String name;

    /**
     * 代码
     */
    private String code;


    /**
     * 上级组织原id
     */
    private BigInteger parentOriginId;


    /**
     * 组织/部门
     */
    private Boolean isCompany;


    /**
     * 层级
     */
    private Integer level;


    @Getter
    @Setter
    @TableField(exist = false)
    private String fullPathName;


    @TableField(exist = false)
    private String thirdLevePathName;

    @TableField(exist = false)
    private List<DhgDepartmentEntity> children = new ArrayList<>();


}
